<?
require "include/bittorrent.php";
dbconn(false);
loggedinorreturn();

if (get_user_class() < UC_POWER_USER)
	error("Permission denied.");
	
$id = (int)$_GET["id"];

if (!is_valid_id($id))
	error("Invalid ID.");

$res = query("SELECT name,nfo FROM torrents WHERE id=$id") or sqlerr();
$arr = mysql_fetch_assoc($res) or error("Invalid ID.");
$nfo = htmlspecialchars($arr["nfo"]);

stdhead("View NFO");
print("<h1>NFO for <a href=details.php?id=$id>$arr[name]</a></h1>\n");
print("<table border=1 cellspacing=0 cellpadding=5><tr><td class=text>\n");
print("<pre><font face='Courier' size=2 style='font-size: 10pt; line-height: 10pt'>" . format_urls($nfo) . "</font></pre>\n");print("</td></tr></table>\n");
stdfoot();
?>
